;_____________________________________________________________________
;---------------------------------------------------------------------
;	File: PML_AutoRun
;---------------------------------------------------------------------
;	
;	Group: Overview
;
;		The contents of this file will be executed upon running the PM
;		Application Launcher File. At the end of this file is where
;		the script will stop auto-executing code and wait for user input.
;
;	Group: About
;		- *Written By:* 	Rameen Bakhtiary
;		- *Last Modified:* 	11/29/2011
;_____________________________________________________________________
;---------------------------------------------------------------------
PML_AutoRun: 



;=================================================================
;                      INITIATE GLOBAL VARIABLES
;=================================================================
gosub, PML_Globals
		
	
	
	
;==============================
;		 SET TRAY ICON
;==============================
	if A_IsCompiled
		menu, tray, icon, % A_ScriptFullPath, -159

	


;=============================
;		SET TRAY MENU
;=============================
	If A_IsCompiled
		Menu, Tray, NoStandard
	Menu, Tray, Add, Launch, main
	Menu, Tray, Add, %TRAY_HELP_CAPTION%, AboutME
	Menu, Tray, Add
	Menu, Tray, Add, Exit, CloseHer
	Menu, Tray, Default, %TRAY_DCLICK_ACTION%
	Menu, Tray, Color, %TRAY_COLOR%





;==============================
;		BUILD CONTEXT MENU(S)
;==============================
	Menu, title, Add, Browse Engineering Public, browsePublic
	Menu, title, Add, Browse Public PM App Launcher Folder, browsePublic
	Menu, title, Add,
	Menu, title, Add, Open versionCheck, browsePublic
	Menu, title, Add, Open userList, browsePublic
	Menu, title, Add, Launch PM App Launcher Site, LaunchWebsite
	Menu, title, Add,
	Menu, title, Add, Set Double-Click Title Action, setTitleAction
	Menu, Title, Color, FF5E5E
	
	
	
	
;=============================
;		SET TRAY TOOLTIP
;=============================
	Menu, Tray, Tip, %TRAY_TIP%
	




;===========================================================================
;		GET THE VERSION OF PM APP LAUNCHER CURRENTLY RUNNING (THIS FILE)
;		- Used to display version on main gui; not the value used when
;		  checking for updates
;===========================================================================
	FileGetVersion, Version, % A_ScriptFullPath






;=================================================================
;           GET  USERNAME ALIAS  FROM  (FOR EASY LOGGING)
;=================================================================
	IniRead, user, %ULIST%, userNames, %A_UserName%
	if user = Error
		user = %a_username%




	
;=================================================================
;                  INITIALIZE THE SUB-GUIs
;=================================================================
	Gosub, PMgui_EFDgui
	Gosub, PMgui_EDSgui
	
	
	
	
;==============================================================
;		START THE UPDATE CHECK TIMER (ONLY IF COMPILED)
;==============================================================
	if A_IsCompiled
	{
		;__________________________________
		; 		CHECK FOR UPDATE ON STARTUP
		;
		gosub, updateCheck
		SetTimer, updateCheck, %updateInt%
	}
Return







;____________________________________  .E.N.D.   .O.F.   .F.I.L.E. _________________________________
;%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%&%




